class Draw:
	def __init__(self):
		import sysinfo
		import EventHandler
		events = Event()
		
	def event(boxNum, cursorOver, img):
		flicker = False
		height = 20
		xLoc = 0
		yLoc = 56
		# positionOffset
		posOffest = boxNum * height
		
		img.rectangle([(0, 56 + pO), (sysinfo.display_pixels()[1], 76 + posOffest)], 0xCCCCCC, 0xCCCCCC)
		if cursorOver == True:
			if flicker == True:
				flicker = False
				img.rectangle([(0, 56 + posOffst), (sysinfo.display_pixels()[1], 76 + posOffest)], 0xF0F0F0, 0x0000000)
			else:
				flicker = True
	
	def cursor(img, cur):
		width = display_pixels()[0] - cur.getOffset()
		img.line([(cur.getOffset(), cur.getPosition()), (display_pixels()[0], cur.getPosition())], 0xE47833, width = 3)
		img.line([(self.width, cur.getPosition()), (width, cur.getPosition() + cur.getHeight())], 0xE47833, width = 3)
		img.line([(self.width, cur.getPosition() + cur.getHeight()), (cur.getOffset(), cur.getPosition() + cur.getHeight())], 0xE47833, width = 3)
		img.line([(cur.getOffset(), cur.getPosition() + cur.getHeight()), (cur.getOffset(), cur.getPosition())], 0xE47833, width = 3)
		
	#def text(text, pos, img):
		#img.text([pos]), text, font = 'normal') 
	
	def mainScreen(img):
		img.text([(5, 20)], u"Student Day Planner", font = 'normal') # style
		img.text([(5, 45)], u"CURRENT_DATE", font = (u'LatinBold12', 15, appuifw.STYLE_BOLD))
		
		tmp = 0
		for hour in hours:
			if int(hour) <= 9:
				img.text([1, 72 + tmp], u" " + unicode(hour) + u":00", font = 'dense')
			else:
				img.text([1, 72 + tmp], unicode(hour) + u":00", font = 'dense')
			tmp+= 20

		img.line([(50, 50), (50, 400)], 0xFF0000, width = 3) # draw red line
		img.line([(0, 25), (350, 25)], 0x00FF00, width = 3) # draw blue line
		img.line([(0, 50), (350, 50)], 0x0000FF, width = 3) # draw green line